package com.fastCms.manager.bim.controller.api;


import com.fastCms.business.bim.manage.VideoManageService;
import com.fastCms.business.bim.pojo.vo.DeviceGroupAndDevicesVO;
import com.fastCms.business.bim.pojo.vo.DeviceInfoVO;
import com.fastCms.business.frame.response.ApiResponse;
import com.fastCms.manager.frame.annotation.UserAccess;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 商品 前端控制器
 * </p>
 *
 * @author liusq
 * @since 2021-03-05
 */
@RestController
@RequestMapping("api/video")
@Api(value = "ApiVideoController", tags = "前端-监控视频接口")
@UserAccess
public class ApiVideoController {

    @Autowired
    private VideoManageService videoManageServiceImpl;

    @ApiOperation(value = "首页大屏-展示所有的视频监控及其坐标", notes = "")
    @GetMapping("/showAllVideo")
    public ApiResponse<List<DeviceInfoVO>> showAllVideo() {
        ApiResponse<List<DeviceInfoVO>> videos = videoManageServiceImpl.showAllVideo();
        return videos;
    }

    @ApiOperation(value = "首页大屏-视频组列表", notes = "")
    @GetMapping("/list")
    public ApiResponse<List<DeviceGroupAndDevicesVO>> list() {
        ApiResponse<List<DeviceGroupAndDevicesVO>> videos = videoManageServiceImpl.list();
        return videos;
    }

//    @ApiOperation(value = "首页大屏-视频组下的监控设备", notes = "")
//    @GetMapping("/videos/{groupId}")
//    public ApiResponse<List<DeviceInfoVO>> getVideos(@PathVariable Integer groupId) {
//        ApiResponse<List<DeviceInfoVO>> videos = videoManageServiceImpl.getVideos(groupId);
//        return videos;
//    }

}
